<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" errorPage="error/errorpage.jsp"%>
<%@ page language = "Java" import = "java.io.*, java.util.*"%>
<%@ page import="beans.BeanLoginUser"
		import="mapping.Idioma"
		import="mapping.Usuario"%>
<jsp:useBean id="mybean" class="beans.BeanLoginUser"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<link rel="stylesheet" href="estilos/style.css" type="text/css" media="screen" charset="utf-8"/>
	<script src ="ajax/scriptaculous-js-1.8.1/lib/prototype.js"  type="text/javascript" charset="utf-8"></script>
	<script src ="ajax/scriptaculous-js-1.8.1/src/effects.js" type="text/javascript" charset="utf-8"></script>
	<script src="ajax/ajax_utils.js" type="text/javascript" charset="utf-8"></script>
	<script src="ajax/ajax_login.js" type="text/javascript" charset="utf-8"></script>
	<script src="js/menu.js" type="text/javascript" charset="utf-8"></script>
	<title>ErasmusHelp! - Registro</title>
	<!--[if IE]> <link href="estilos/style_ie.css" rel="stylesheet" type="text/css"> <![endif]-->
	
</head>
<body>
<jsp:include page="hidden.jsp"/>
	<div id='page_wrapper'>
	
	<jsp:include page="cabecera_reg.jsp"/>
	
	<div id='content_wrapper'>
	
	<div class='spacer'></div> 
	
	<div id='contenido'>
	
		<div id="wrapper_registro">
			<form action="#" id="form_reg_user" method="post" onsubmit="return false">
			
			<fieldset>
			<legend>Registro</legend>
			<div class='spacer'></div> 
				<div class="divreg" style="float: left">
						<label for="user">Usuario*</label>
						<div><input type="text" id="user" name="user"
						maxlength="50" title="Introduzca el nombre de usuario de gmail"><span>@gmail.com&nbsp;</span></div>
					</div>
					
					<div id="dividioma"><label for="idioma">Idioma*</label>
						<select id="idioma" name="idioma" title="Selecciona el idioma">
							<%
								//consultamos los tipos de enlaces existentes en la BD
								mybean.conectar();
								List listaIdiomas = mybean.getIdiomas();
								Iterator it = listaIdiomas.iterator();
								while(it.hasNext()){
									String [] idiomas = ((String) it.next()).split(",");
									%>
									<option value = "<%=idiomas[0]%>"><%=idiomas[1]%></option>
								<%
								}//fin while
								mybean.desconectar();
							%>
				        </select>
			        </div>
					
					<div class="divreg">
						<label for="nombre">Nombre*</label>
						<input type="text" id="nombre" name="nombre" maxlength="50"	title="Introduzca su nombre"> 
					</div>
			        
					<div class="divreg">
						<label for="apell">Apellidos</label>
						<input type="text" id="apell" name="apell" maxlength="50" size="30" title="Introduzca sus apellidos"> 
					</div>
					<div class="divreg">
						<label for="email">e-mail</label>
						<input type="text" id="email" name="email" class="validate-email"
						maxlength="50" size="30" title="Introduzca su e-mail"> 
					</div>			
					
					<br/>
					<br/>
					
					<div id="capabotonesreg">
						<button class="mybtn" onmouseover="goLite(this)" onmouseout="goDim(this)" onclick="history.back();">Cancelar</button>				
 						<button id="btInsEnlace" type="submit" class="mybtn" onmouseover="goLite(this)" onmouseout="goDim(this)"
						onclick="procesaParametrosYRedirige('res_insert', 'form_reg_user', 'proc_inserta_usuario.jsp', 'get', 'index.jsp')">Guardar</button>
						<!-- onclick="doPostBack('form_reg_user'); procesaParametrosYRedirige('res_insert', 'form_reg_user', 'proc_inserta_usuario.jsp', 'get', 'index.jsp')">Guardar</button> -->
					</div>
					</fieldset>
				</form>
			
			<div id="res_insert">
			
			</div>
					
		</div>

	
	<div class='spacer'></div>
	
	</div>
	</div>
	<jsp:include page="pie.html"/>
	
	</div>
	
	</body>
	
	</html>
